<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="jemdoc, see http://jemdoc.jaboc.net/" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="icon" href="./images/icon.png">
<link rel="stylesheet" href="main.css" type="text/css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<!--- <title>jemdoc &ndash; latex equations</title> --->
<title>jemdoc + new design</title>
<!-- MathJax -->
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async>
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
	  TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
<!-- End MathJax -->
</head>
<body>
<div id="main-container">
<div id="header-container">
<div id="header">
<div id="header-icon-text-container">
<div id="header-icon-container" >
<a href="index.html"><img src="./images/profile2.png" alt="" style="width: 100%; height: 100%; position: center; padding:0px; margin: 0px;"></a>
</div>
<div id="header-text-container">
<a href="index.html">jemdoc + new design</a>
</div>
</div>
<div id="main">
<button class="openbtn" onclick="openNav()">☰</button>
</div>
</div>
</div>
<div id="layout">
<div id="layout-menu-container">
<div id="layout-menu">
<div class="menu-item"><a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a></div>
<div class="menu-item"><a href="index.html">About</a></div>
<div class="menu-category">My Templates</div>
<div class="menu-item"><a href="profile.html">Profile&nbsp;Page</a></div>
<div class="menu-item"><a href="post1.html">Blog&nbsp;Post&nbsp;Page</a></div>
<div class="menu-item"><a href="projects.html">Project&nbsp;Page</a></div>
<div class="menu-item"><a href="group.html">Group&nbsp;Page</a></div>
<div class="menu-category">Jemdoc</div>
<div class="menu-item"><a href="download.html">download</a></div>
<div class="menu-item"><a href="revision.html">version/bug&nbsp;info</a></div>
<div class="menu-item"><a href="contact.html">contact</a></div>
<div class="menu-category">User's guide</div>
<div class="menu-item"><a href="using.html">running&nbsp;jemdoc</a></div>
<div class="menu-item"><a href="example.html">example&nbsp;page</a></div>
<div class="menu-item"><a href="nomenu.html">example&nbsp;page&nbsp;(no&nbsp;menu)</a></div>
<div class="menu-item"><a href="cheatsheet.html">cheat&nbsp;sheet</a></div>
<div class="menu-item"><a href="extra.html">extra&nbsp;syntax</a></div>
<div class="menu-category">Configuration</div>
<div class="menu-item"><a href="htmlchanges.html">html&nbsp;changes</a></div>
<div class="menu-item"><a href="menu.html">adding&nbsp;a&nbsp;menu</a></div>
<div class="menu-item"><a href="modelines.html">modelines</a></div>
<div class="menu-category">Goodies</div>
<div class="menu-item"><a href="stuff.html">vim,&nbsp;make</a></div>
<div class="menu-item"><a href="latex.html" class="current">latex&nbsp;equations</a></div>
<div class="menu-item"><a href="tables.html">tables</a></div>
<div class="menu-category">Additional Features</div>
<div class="menu-item"><a href="mathjax.html">MathJax</a></div>
<div class="menu-item"><a href="underscore.html">Underscore</a></div>
<div class="menu-item"><a href="link.html">Link</a></div>
<div class="menu-item"><a href="http://www.google.com" target="blank">Open&nbsp;in&nbsp;New&nbsp;Tab</a></div>
</div> <!-- <div id="layout-menu"> -->
</div> <!-- <div id="layout-menu-container"> -->
<div id="layout-content-container">
<div id="layout-content">
<div id="toptitle">
<h1>jemdoc &ndash; latex equations</h1>
</div>
<p>jemdoc includes support for LaTeX equations. LaTeX source embedded in jemdoc
files is processed by calling <a href="http://www.latex-project.org/" target=&ldquo;blank&rdquo;><tt>latex</tt></a> and
<a href="http://www.nongnu.org/dvipng/" target=&ldquo;blank&rdquo;><tt>dvipng</tt></a> (which must both be available for this
feature). Resulting PNG images are then placed on the web page. Equations are
typeset using pure LaTeX.</p>
<div class="infoblock">
<div class="blockcontent">
<p>jemdoc equation support relies on several pieces, any of which may break. No
guarantees! Support may be limited.</p>
</div></div>
<h2>Inline equations</h2>
<p>The conjugate function \(f^\star(y) = \sup_{x \in X}(y^Tx - f(x))\) appears here
inline, and is in the variable \(y\). Dollar signs (<tt>$</tt>) surround the LaTeX
equation in the jemdoc source.</p>
<div class="codeblock">
<div class="blocktitle">Syntax</div>
<div class="blockcontent"><pre>
The sample function $f^\star(y) = \sup_{x \in X}(y^Tx - f(x))$
appears here inline, and is in the variable $y$.
</pre></div></div>
<h2>Equations on separate lines</h2>
<p>To render an equation on its own line, use backslash-escaped round brackets
(<tt>\(</tt> and <tt>\)</tt>). For example, the identity</p>
<p style="text-align:center">
\[
(I + XY)^{-1} = I - X(I + YX)^{-1}Y
\]
</p><p>is typeset on its own line. Yes, round brackets instead of square
brackets&#8201;&mdash;&#8201;this is to avoid a conflict with ordinary square brackets that are
escaped to avoid being a link.  Sorry.</p>
<div class="codeblock">
<div class="blocktitle">Syntax</div>
<div class="blockcontent"><pre>
The identity
\(
    (I \+ XY)^{-1} = I - X(I \+ YX)^{-1}Y
\)
is typeset on its own line.
</pre></div></div>
<p>Here, the line breaks (and other whitespace) are ignored. As always, the exact
formatting details can be adjusted using CSS.</p>
<h2>Notes</h2>
<ul>
<li><p>The baseline is carefully adjusted. The sequences m\(m\)m and y\(y\)y (<tt>m$m$m</tt>
and <tt>y$y$y</tt>), for example, should be neatly aligned (modulo bad browsers).</p>
</li>
<li><p>Definition by cases will work as expected, for example, \(f(x)\), where</p>
</li>
</ul>
<p style="text-align:center">
\[
  f(x) = \left\{
  \begin{array}{ll}
  3, &amp; x \leq 0 \\
  5, &amp; x &gt; 0. \\
  \end{array}\right.
  \]
</p><p>(You can view the <a href="latex.jemdoc" target=&ldquo;blank&rdquo;>jemdoc source</a> for this page.)</p>
<ul>
<li><p>A random inequality might look like \(3x + 2y^{4k + 6} \geq z\).</p>
</li>
<li><p>This page takes about 0.7 seconds to process on an average machine, including
making all the equations from scratch.</p>
</li>
<li><p>There are several configuration options for equations. They are detailed on
the <a href="modelines.html" target=&ldquo;blank&rdquo;>modelines</a> page.</p>
</li>
</ul>
</div> <!-- <div id="layout-content"> -->
<div id="footer-container">
<div id="footer">
<div id="footer-text">
Last edited  on 2020-05-11 20:20:10 PDT. </br>
Powered by <a href="https://github.com/szl2/jemdoc-new-design" target="blank">jemdoc + new design</a>.
(<a href="latex.jemdoc">source</a>)>&nbsp
</div> <!-- <div id="footer-text"> -->
</div> <!-- <div id="footer"> -->
</div> <!-- <div id="footer-container"> -->
</div> <!-- <div id="layout-content-container"> -->
</div> <!--- <div id="layout"> --->
</div> <!--- <div id="main-container"> --->
<script>
function openNav() {
    if (window.innerWidth <= 1200) {
        document.getElementById("layout-menu").style.width = "280px";
        document.getElementById("layout-content-container").style.marginLeft = "280.8px";
        document.getElementById("layout-content-container").style.position = "fixed";
    }
}
function closeNav() {
    if (window.innerWidth <= 1200) {
        document.getElementById("layout-menu").style.width = "0";
        document.getElementById("layout-content-container").style.position = "static";
        document.getElementById("layout-content-container").style.marginLeft = "0px";
        setInterval(
            function(){ location.reload() },
            500
        );
    }
}
</script>
</body>
</html>
